<?php
if(!empty($_POST['username'])){
date_default_timezone_set('ASIA/Shanghai');
$time=date('Y-m-d H:i:s',time());			//时间
$_POST['addtime']=$time;
$_POST['password']=md5($_POST['password']);
unset($_POST['add']);
$data=$_POST;
$row=insert('admin',$data);
if($row>-1){
	echo '<script>alert ("添加成功");location="index.php?admin=1&c=admin&a=list";</script>';
	};

};
view();
?>